﻿@using System.Threading
@model IEnumerable<YogaStudio.Data.Domain.Order>

@{
    ViewBag.Title = "PurchasedOrder";
}


<div class="main">
    <div class="content">
        <div class="section group">
            <div class="col span_2_of_3">
                <div class="contact-form">
                    <h3>Your Purchased Orders</h3>
                    <div class="datagrid">
                        <table id="box-table-a">
                            <tr>
                                <th>
                                    No.
                                </th>
                                <th scope="col">
                                    @Html.DisplayNameFor(model => model.OrderDate)
                                </th>
                                
                                <th>
                                    Action
                                </th>

                            </tr>
                            @{ var count = 0;}
                            @foreach (var item in Model)
                            {
                                <tr>
                                    <td>
                                        @{ count++;}
                                        @count
                                    </td>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.OrderDate)
                                    </td>
                                    <td>
                                        @Html.ActionLink("Order Details", "PurchasedOrderDetails", "Product", new { orderId = item.OrderId }, null)
                                    </td>
                                </tr>
                            }

                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>